// 书写所有关于 users的接口请求

// 导入我们封装好的 axios 实例
import request from '@/utils/requiest'

// 1.验证手机是否被注册过
 export const phoneApi=(tel:string)=>request.post('/user/docheckphone',{
tel })

// 2.发送短信验证码
export const sendCodeApi=(tel:string)=>request.post('/user/dosendmsgcode',{tel})

//3.验证短信验证码
export const clickCodeApi=(tel:string,telcode:string)=>request.post('/user/docheckcode',{tel,telcode})
// 4.确认注册
export const registerApi=(tel:string,password:string)=>request.post('/user/dofinishregister',{tel,password})

//5.确认登录
export const loginApi=(loginname:string,password:string)=>request.post('/user/login',{loginname,password})

// 6.获取用户详细信息
export const getUserInfoApi=(userid:string)=>request.get("/user/info",{params:{userid}})